﻿#ifndef YUVDISPALYWIDGET_H
#define YUVDISPALYWIDGET_H
/*******************************************************************
 *  Copyright(c) 2018-2018 A single spark
 *  All rights reserved.
 *
 *  文件名称:yuvdispalywidget.h
 *  简要描述:播放界面图像绘制以及控制接口
 *
 *  修改日期:  2018.03.20
 *  作者:      LD
 *  邮箱:
 *  说明:

 ******************************************************************/

#include "yuvwidget.h"

class yuvoperater;

class YUVDispalyWidget : public YUVWidget
{
    Q_OBJECT

public:
    explicit YUVDispalyWidget(QWidget *parent = 0);
    ~YUVDispalyWidget();

    void init(QString strFile);
    void play();
    void pause();
    void stop();
    void prevFrame();
    void nextFrame();

protected:
    void paintEvent(QPaintEvent *event);

signals:
    void sigOnFrame(quint64 nCurFrameIndex, quint64 nTotalFrames);

public slots:
    void slotOnOneFrame(QImage img, quint64 nCurFrameIndex, quint64 nTotalFrames);

private:
    QImage m_imgVideo;
    yuvoperater* m_pYuvOperater;

};

#endif // YUVDISPALYWIDGET_H
